home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Best of Shareware
/
Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso
/
mac
/
DOS
/
EDITORS
/
SLEEK32
/
SLEEK.DOC
< prev
next >
Wrap
Text File
|
1992-12-28
|
11KB
|
335 lines
SLEEK (SLK.EXE), a file-reformatting utility
Version: 3.2
Dec. 28, 1992
SLEEK is Copyright 1991, 1992 by Lambert Klein
P.O. Box 611
Wayne MI 48184
Voice telephone: (313) 326-1583
GEnie: L.Klein1
CompuServe: 72010,624
Internet: 72010.624@compuserve.com
AOL: LKlein3990
Member, Association of Shareware Professionals
=======================================================
┌─────────┐
┌─────┴───┐ │ (R)
──│ │o │──────────────────
│ ┌─────┴╨──┐ │ Association of
│ │ │─┘ Shareware
└───│ o │ Professionals
──────│ ║ │────────────────────
└────╨────┘ MEMBER
"This program is produced by a member of the Association of
Shareware Professionals (ASP). ASP wants to make sure that
the shareware principle works for you. If you are unable to
resolve a shareware-related problem with an ASP member by
contacting the member directly, ASP may be able to help. The
ASP Ombudsman can help you resolve a dispute or problem with
an ASP member, but does not provide technical support for
members' products. Please write to the ASP Ombudsman at 545
Grover Road Muskegon MI 49442 or send a Compuserve message
via easyplex to ASP Ombudsman 70007,3536."
============================================================
SLK.EXE is shareware. If you try it out, find it useful and
go on using it - please register it. Registration is only
$10.00.
============================================================
PURPOSE
SLEEK is a high-speed text reformatter. Its purpose is to
alter the lengths of lines in plain-text files, such as
those created by text editors like PC-Write or Qedit (or
files saved "unformatted" - but with "hard" line endings
within paragraphs - by word processing programs such as
Microsoft Word).
---------------------------------------------------------
Documentation for SLEEK (SLK.EXE), v. 3.2. Page 1
(c) Copyright 1991, 1992 Lambert Klein
The program is useful for reformatting text files with
relatively short line lengths, perhaps (as with this file)
because the writer assumed you'd be using a typical dot-
matrix printer setup to print them. But if you're using, say,
compressed mode for printing, you might prefer that the lines
be longer (thereby saving some paper). SLEEK can help with
this by increasing the line lengths to your specifications.
WHAT IT DOES
You can tell SLEEK to format line lengths out to a specified
column, from 10 to 60,000. If you do not specify any column
width, SLEEK changes all paragraphs in a text file to a
single long line (with exceptions as noted below).
The latter function is useful to people who must take text
files containing many "hard" line breaks and import them
into a desktop publishing (DTP) program or open them with a
program like Microsoft Word. It is almost always desirable
to allow DTP programs, or Word and others like it, to make
their own decisions about line breaks. "Hard" returns inside
paragraphs in typical plain-text files block automatic line-
wrapping - a major pain in the neck for the DTP program
user. The solution is often either tedious manual
reformatting or multiple passes through the file with a
search/replace program (or with a DTP program's search/
replace routine).
SLEEK, which is written entirely in assembly language, does
its work quickly. For example, on a RAM disk on a 486-33
computer, SLEEK has been observed to process a 105K text
file - removing ALL hard breaks within paragraphs - in less
than one second (if it had been re-breaking lines to
SPECIFIED lengths, it would probably have taken several
seconds to process the file). (Of course, as they say: Your
mileage may vary.)
HOW IT WORKS
SLEEK first trims extra spaces from the ends of lines. Then,
on any line to be merged with the one below it, the "newline
character" at the end of the line (actually, a carriage
return followed by a line feed) is removed and replaced by a
single space.
Reformatting stops at the end of a paragraph - which, from
SLEEK's point of view, occurs when there are two or more
"newlines" in a row - and begins again at the top of the
next paragraph. (SLEEK does not do anything to blank lines.)
---------------------------------------------------------
Documentation for SLEEK (SLK.EXE), v. 3.2. Page 2
(c) Copyright 1991, 1992 Lambert Klein
Another exception: Reformatting does NOT occur on any lines
that begin with one or more spaces OR tab characters. Thus,
you can use leading spaces or tabs to help control how the
output file will look. (See the examples later in this
documentation.)
What about hyphens? Hyphens are used in a couple of
different ways within plain-text files: to force-hyphenate
words and/or to create simulated "EM" or "EN" dashes.
If SLEEK, in reformatting a text file, must join a line with
the one below it, and if the first line ends with a hyphen
followed by a space, the space will be RETAINED when the two
lines are joined. This is to ensure that if the hyphen-
followed-by-space is part of a dash - just like that - the
same positioning of spaces and hyphen(s) will be retained in
the output file.
On the other hand, if a line ends with a manually-
hyphenated word (just like that), SLEEK will NOT add a space
after the hyphen if the line is joined with the one below
it - unless there is ALREADY a space to the right of the
hyphen in the input file (which would normally be a mistake
in a situation like that).
SLEEK will never force a break INSIDE a word, but if it is
shortening lines: When it encounters a hyphenated word it
will, if possible, break the word at the hyphen, leaving the
hyphen on the upper line.
PROGRAM SYNTAX
SLK d:\path\filename /nn
where:
"d:\path\" represents OPTIONAL path information to tell
SLEEK the location of the file to be processed (the input
file);
"filename" is the name of the input file; and
"/nn" is an OPTIONAL command-line "switch" telling SLEEK at
what column to re-break the lines in the file. For example,
"/50" would tell SLEEK to reformat the lines out to column
50. The "nn" value can be 0, or in a range from 10 to 60000.
If you use "/0," SLEEK will use its maximum line-length
setting (60,000). If you completely OMIT the "/nn"
information, you're also in effect telling SLEEK to use its
---------------------------------------------------------
Documentation for SLEEK (SLK.EXE), v. 3.2. Page 3
(c) Copyright 1991, 1992 Lambert Klein
maximum line-length setting (in which case the effect is to
make all paragraphs in the file into a single long line -
unless they begin with one or more spaces or tabs, or unless
they are longer than 60,000 characters - not too likely).
If you use a "/nn" setting of from 1 to 9, SLEEK will
default to a setting of 10.
NOTE: The alternate command-line switch character (a hyphen)
is supported in this version of SLEEK.
OUTPUT FILES
SLEEK never over-writes your original file. It creates an
output file having the same "base" name as the input file,
but with the extension ".SLK." Thus: INPUT.DOC --> INPUT.SLK.
If you include a path in the input file name, that path will
also be used for the output file.
Thus: D:\INPUT.DOC --> D:\INPUT.SLK, even if you are not
logged onto D:\ at the time you give the SLEEK command.
CAUTION: The program will OVER-WRITE an existing .SLK file
without query. If you run SLEEK on a file called
INPUT.DOC twice: The second time around, the new
INPUT.SLK will replace the first.
*NEVER* use for input a file whose extension is
".SLK". The result is that you'll lose the input
file completely; it will be written back to disk
as a zero-length file.
OTHER LIMITATIONS
The present version of SLK does not accept wildcards in the
input file name.
Files whose line endings consist ONLY of a carriage-return
character (as with text files written on a Macintosh) are
not suitable as input files until you add a line feed to
each carriage return. Files whose lines end with ONLY a
line feed character (as with text files written on a Unix
system) will be processed almost, but not quite, as
described above (the results are not entirely predictable).
For best results, ensure that all "newlines" are carriage-
return/line-feed pairs.
NOTE: SLK.EXE *CAN* read past a CTRL-Z (end-of-file)
character in an input file. It will not remove the
CTRL-Z and will go on processing lines below it.
---------------------------------------------------------
Documentation for SLEEK (SLK.EXE), v. 3.2. Page 4
(c) Copyright 1991, 1992 Lambert Klein
EXAMPLES
Suppose the input file (call it TEST.DOC) looks like this:
Line one.
Line two.
Line three.
Line four.
Line five.
Line six.
... and you use this command line:
SLK test.doc
(no line length specified) The output file, TEST.SLK, will
look like this:
Line one. Line two. Line three. Line four.
Line five. Line six.
Suppose instead the input file looks like the output file
shown immediately above, and you use this command line:
SLK test.doc /31
The result is:
Line one. Line two. Line three.
Line four.
Line five. Line six.
If the input file TEST.DOC looks like this:
Line one. Line two.
Line three.
Line four.
Line five.
Line six.
Line seven.
Line eight.
Line nine.
... and you give this command (again, with no line-length
information):
SLK test.doc
... then the output file, TEST.SLK, looks like this:
---------------------------------------------------------
Documentation for SLEEK (SLK.EXE), v. 3.2. Page 5
(c) Copyright 1991, 1992 Lambert Klein
Line one. Line two.
Line three.
Line four. Line five.
Line six. Line seven.
Line eight. Line nine.
That illustrates how lines beginning with spaces are NOT
merged with adjacent lines just above them and ARE merged
with lines just below them - unless the lines below ALSO
begin with one or more spaces.
I hope you find SLEEK useful. If you have any comments,
suggestions, bug reports, and so on, please send them to me
at the address shown above. See the file PROGRAMS.TXT, also
in the archive SLEEK.ZIP, for information on my other
shareware, including PrintPlus, my menu-driven dot-matrix
printer control program.
Any registered or trademarked product names mentioned in
this documentation are the property of their respective
owners or publishers.
(Documentation assistant: Mike Arst, Compuserve 70403,1337)
---------------------------------------------------------
Documentation for SLEEK (SLK.EXE), v. 3.2. Page 6
(c) Copyright 1991, 1992 Lambert Klein